#include "BoundingBox.hpp"
#include <gl/glut.h>

//TODO: change this contructor... it is ugly and unsafe
BoundingBox::BoundingBox(MVector3D *pCorners)
{
	m_pCorners = pCorners;
}

BoundingBox::~BoundingBox()
{
	delete[] m_pCorners;
}

void BoundingBox::invalidateBV(MVector3D& trans)
{
	for(short i = 0; i < 8; ++i)
	{
		m_pCorners[i].x += trans.x;
		m_pCorners[i].y += trans.y;
		m_pCorners[i].z += trans.z;
	}
}

const MVector3D* BoundingBox::getCorners() const
{
	return m_pCorners;
}

void BoundingBox::render()
{
	glBegin(GL_QUADS);

	//top

	//bottom

	//front

	//rear

	//left

	//right

	glEnd();
}

//EOF
